/*
 * @Author: czy
 * @Date: 2021-04-26 07:48:40
 * @LastEditTime: 2021-05-02 07:48:35
 */

#ifndef __MYSTDIO_H_
#define __MYSTDIO_H_

#include "const.h"

#define BUFSIZE 400
#define va_start(v, l) __builtin_va_start(v, l)
#define va_end(v) __builtin_va_end(v)
#define va_arg(v, l) __builtin_va_arg(v, l)

typedef __builtin_va_list va_list;

void clear(void);
void info(int cursor, int reverse, char *msg, int color);
int vsprintf(char *buf, const char *fmt, va_list args);
int sprintf(char *buf, const char *fmt, ...);
int myPrintk(int color, const char *format, ...);
int myprintk(const char *format, ...);
int myPrintf(int color, const char *format, ...);
int myprintf(const char *format, ...);
void message(int position, int color, char *format, ...);
void cursor_offset(int offset);
void myPutchar(unsigned char ch);
unsigned char myGetchar(void);

#endif